package com.stormrage.shiro.taglib;

import org.springframework.util.CollectionUtils;

import com.stormrage.spring.SpringUtils;
import com.stormrage.edu.serv.shiro.ShiroServ;

/**
 * @author www.stormragetech.com
 * @date 2016年1月19日
 * @version 1.0.0
 */
public class Functions {

	@SuppressWarnings("rawtypes")
	public static boolean in(Iterable iterable, Object element) {
		if (iterable == null) {
			return false;
		}
		return CollectionUtils.contains(iterable.iterator(), element);
	}

	private static ShiroServ shiroServ;

	public static ShiroServ getShiroServ() {
		if (null == shiroServ) {
			shiroServ = SpringUtils.getBean(ShiroServ.class);
		}
		return shiroServ;
	}

}